package com.css.fxfzxczh.modules.lossReportManage.lossReportEscalation.strategy;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public class StrategyFactory {
    @Autowired
    Map<String, StrategyService> service ;

    /**
     * 关于数据视图导出和shp入库的接口
     * @param component
     * @return
     */
    public StrategyService getService(String component){
        StrategyService strategyService = service.get(component);
        if(strategyService == null) {
            throw new RuntimeException("策略模式没找到对应实现类");
        }
        return strategyService;
    }
}